\hypertarget{class_caziac_1_1_tools_1_1_i_reader}{
\section{Caziac::Tools::IReader Class Reference}
\label{class_caziac_1_1_tools_1_1_i_reader}\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}}
}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \hyperlink{class_caziac_1_1_tools_1_1_i_reader}{IReader} \& \hyperlink{class_caziac_1_1_tools_1_1_i_reader_a33ef77cf2f18df9b9969db99b55258df}{operator$>$} (std::string \&str)=0
\begin{DoxyCompactList}\small\item\em Get a word from the Reader. \item\end{DoxyCompactList}\item 
virtual \hyperlink{class_caziac_1_1_tools_1_1_i_reader}{IReader} \& \hyperlink{class_caziac_1_1_tools_1_1_i_reader_a50be19bc26a3c6e65e2bba033b1934dc}{operator$>$$>$} (std::string \&str)=0
\begin{DoxyCompactList}\small\item\em Get a line from the Reader. \item\end{DoxyCompactList}\item 
virtual std::string \hyperlink{class_caziac_1_1_tools_1_1_i_reader_a891a890e3d8ebe1cd19b4f47bb91c562}{getFirstWord} () const =0
\begin{DoxyCompactList}\small\item\em Serve to know if there is a word. \item\end{DoxyCompactList}\item 
virtual std::string \hyperlink{class_caziac_1_1_tools_1_1_i_reader_a2d0a815fbca1ae947f364f1ddbe3079f}{getFirstLine} () const =0
\begin{DoxyCompactList}\small\item\em Serve to know if there is a line. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{class_caziac_1_1_tools_1_1_i_reader_aa9d6fcf435fc40d7b424c3442908f662}{readSize} (std::vector$<$ char $>$ \&buffer, unsigned int const size)=0
\begin{DoxyCompactList}\small\item\em read a content length \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{class_caziac_1_1_tools_1_1_i_reader_a2d0a815fbca1ae947f364f1ddbe3079f}{
\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}!getFirstLine@{getFirstLine}}
\index{getFirstLine@{getFirstLine}!Caziac::Tools::IReader@{Caziac::Tools::IReader}}
\subsubsection[{getFirstLine}]{\setlength{\rightskip}{0pt plus 5cm}virtual std::string Caziac::Tools::IReader::getFirstLine (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{class_caziac_1_1_tools_1_1_i_reader_a2d0a815fbca1ae947f364f1ddbe3079f}


Serve to know if there is a line. 

\begin{DoxyReturn}{Returns}
the first line of the reader This method does not change the buffer 
\end{DoxyReturn}
\hypertarget{class_caziac_1_1_tools_1_1_i_reader_a891a890e3d8ebe1cd19b4f47bb91c562}{
\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}!getFirstWord@{getFirstWord}}
\index{getFirstWord@{getFirstWord}!Caziac::Tools::IReader@{Caziac::Tools::IReader}}
\subsubsection[{getFirstWord}]{\setlength{\rightskip}{0pt plus 5cm}virtual std::string Caziac::Tools::IReader::getFirstWord (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{class_caziac_1_1_tools_1_1_i_reader_a891a890e3d8ebe1cd19b4f47bb91c562}


Serve to know if there is a word. 

\begin{DoxyReturn}{Returns}
the first word of the reader This method does not change the buffer 
\end{DoxyReturn}
\hypertarget{class_caziac_1_1_tools_1_1_i_reader_a33ef77cf2f18df9b9969db99b55258df}{
\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}!operator$>$@{operator$>$}}
\index{operator$>$@{operator$>$}!Caziac::Tools::IReader@{Caziac::Tools::IReader}}
\subsubsection[{operator$>$}]{\setlength{\rightskip}{0pt plus 5cm}Caziac::Tools::IReader::operator$>$ (
\begin{DoxyParamCaption}
\item[{std::string \&}]{ str}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{class_caziac_1_1_tools_1_1_i_reader_a33ef77cf2f18df9b9969db99b55258df}


Get a word from the Reader. 


\begin{DoxyParams}{Parameters}
\item[{\em str}]string to fill \end{DoxyParams}
\begin{DoxyWarning}{Warning}
If the reader is empty the string will not be changed 
\end{DoxyWarning}
\begin{DoxyReturn}{Returns}
the reader modified
\end{DoxyReturn}
This is an example of a Reader uses :


\begin{DoxyCode}
        std::string     first, second;

        IReader         *reader = new Reader("A simple example");
        
        *reader > first > second;
        std::cout << first << std::endl; // print "A"
        std::cout << second << std::endl; // print "simple"
\end{DoxyCode}


Another example


\begin{DoxyCode}
        std::string     first, second, third;

        IReader         *reader = new Reader("TIC \r\nTAC \r\n TOE");
        
        *reader > first > second > third;
        std::cout << first << std::endl;  // print "TIC"
        std::cout << second << std::endl; // print ""
        std::cout << third << std::endl;  // print "TAC"
\end{DoxyCode}


the second should be empty cause there is no another word in the line. \hypertarget{class_caziac_1_1_tools_1_1_i_reader_a50be19bc26a3c6e65e2bba033b1934dc}{
\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}!operator$>$$>$@{operator$>$$>$}}
\index{operator$>$$>$@{operator$>$$>$}!Caziac::Tools::IReader@{Caziac::Tools::IReader}}
\subsubsection[{operator$>$$>$}]{\setlength{\rightskip}{0pt plus 5cm}Caziac::Tools::IReader::operator$>$$>$ (
\begin{DoxyParamCaption}
\item[{std::string \&}]{ str}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{class_caziac_1_1_tools_1_1_i_reader_a50be19bc26a3c6e65e2bba033b1934dc}


Get a line from the Reader. 


\begin{DoxyParams}{Parameters}
\item[{\em str}]string to fill \end{DoxyParams}
\begin{DoxyWarning}{Warning}
If the reader is empty the string will not be changed 
\end{DoxyWarning}
\begin{DoxyReturn}{Returns}
the reader modified
\end{DoxyReturn}
This is an example of a Reader uses :


\begin{DoxyCode}
        std::string     first, second, third;

        IReader         *reader = new Reader("A simple example\n with multiple li
      nes");
        
        *reader >> first >> second >> third;
        std::cout << first << std::endl;  // print "A simple example"
        std::cout << second << std::endl; // print "with multiple lines"
        std::cout << third << std::endl; // print ""


        *reader >> first;
        std::cout << first << std::endl;  // print "A simple example"
\end{DoxyCode}
 \hypertarget{class_caziac_1_1_tools_1_1_i_reader_aa9d6fcf435fc40d7b424c3442908f662}{
\index{Caziac::Tools::IReader@{Caziac::Tools::IReader}!readSize@{readSize}}
\index{readSize@{readSize}!Caziac::Tools::IReader@{Caziac::Tools::IReader}}
\subsubsection[{readSize}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Caziac::Tools::IReader::readSize (
\begin{DoxyParamCaption}
\item[{std::vector$<$ char $>$ \&}]{ buffer, }
\item[{unsigned int const }]{ size}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{class_caziac_1_1_tools_1_1_i_reader_aa9d6fcf435fc40d7b424c3442908f662}


read a content length 


\begin{DoxyParams}{Parameters}
\item[{\em str}]string to fill \item[{\em size}]to read Read \end{DoxyParams}


The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
\hyperlink{_i_reader_8hh}{IReader.hh}\end{DoxyCompactItemize}
